<#escape x as (x)!"">

CREATE SEQUENCE SEQ_${tableName}_ID START WITH 1;


-- 菜单SQL
INSERT INTO sys_menu (menu_id,parent_id, name, url, perms, type, icon, order_num)
    VALUES (SEQ_MENU_ID.nextval,'1', '${comments}', '${modulePackage}/${functionName}.html', NULL, '1', 'fa fa-file-code-o', '6');

-- 按钮父菜单ID
-- 需要替换 @parentId 
-- select SEQ_MENU_ID.currval from dual; 

-- 菜单对应按钮SQL
INSERT INTO sys_menu (menu_id,parent_id, name, url, perms, type, icon, order_num)
    SELECT SEQ_MENU_ID.nextval, @parentId, '查看', null, '${pathName}:list,${pathName}:info', '2', null, '1' from dual; 
INSERT INTO sys_menu (menu_id,parent_id, name, url, perms, type, icon, order_num)
    SELECT SEQ_MENU_ID.nextval, @parentId, '新增', null, '${pathName}:save', '2', null, '2' from dual; 
INSERT INTO sys_menu (menu_id,parent_id, name, url, perms, type, icon, order_num)
    SELECT SEQ_MENU_ID.nextval, @parentId, '修改', null, '${pathName}:update', '2', null, '3' from dual; 
INSERT INTO sys_menu (menu_id,parent_id, name, url, perms, type, icon, order_num)
    SELECT SEQ_MENU_ID.nextval, @parentId, '删除', null, '${pathName}:delete', '2', null, '4' from dual; 

commit;
</#escape>